package com.cs.command1;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Sam.Lee E-mail:lishanman2007@163.com
 * @version Created：Aug 31, 2011 3:21:24 PM
 */
public class MenuCommand implements Command {

	List<Command> commands = new ArrayList<Command>();

	public void addCommand(Command command) {
		commands.add(command);
	}

	public List<Command> getCommands() {
		return commands;
	}
	
	public void execute() {
		for (Command command : commands) {
			command.execute();
		}
	}

}
